new Vue({
    el: '#app',
    data: {
        allergy: '',
        allergyCnt:'',
        pastHis: '',
        pastHisCnt:'',
        now: '',
        nowCnt:''
    },
    methods: {
        goto() {
            if (this.allergy == '') {
                this.$toast('请选择药物/食物/过敏史')
            } else if (this.pastHis == '') {
                this.$toast('请选择既往史')
            } else if (this.now == '') {
                this.$toast('请选择现病史')
            } else {
                localStorage.setItem("threeIndex",3)
                window.location.href = "vitalSigns.HTML"
            }
        }
    },
    updated() {
        if(this.allergy=='no'){
            this.$refs.foodsCnt.disabled=true;
            this.$refs.foodsCnt.value='';
        }
        else if(this.allergy=='yes') {
            this.$refs.foodsCnt.disabled=false;
            if(this.allergyCnt==''){
                this.$toast('请填写药物/食物/其他物质过敏史')
            }
        }
         if(this.pastHis=='no'){
            this.$refs.historyed.disabled=true;
            this.$refs.historyed.value='';
        }
        else if(this.pastHis=='yes') {
            this.$refs.historyed.disabled=false;
            if(this.pastHisCnt==''){
                this.$toast('请填写既往史详细')
            }
        }
        if(this.now=='no'){
            this.$refs.nows.disabled=true;
            this.$refs.nows.value='';
        }
        else if(this.now=='yes'){
            this.$refs.nows.disabled=false;
            if(this.nowCnt==''){
                this.$toast('请填写现病史详细')
            }
        }
    },

})